import request from '@/utils/request'
import apis from './'

export function allList (parameter) {
  return request({
    url: apis.AllList,
    method: 'get',
    params: parameter
  })
}

export function allList2 (parameter) {
  return request({
    url: apis.AllList2,
    method: 'get',
    params: parameter
  })
}

export function poolList (parameter) {
  return request({
    url: apis.PoolList,
    method: 'get',
    params: parameter
  })
}

export function delList (parameter) {
  return request({
    url: apis.DelList,
    method: 'get',
    params: parameter
  })
}

export function recycleList (parameter) {
  return request({
    url: apis.RecycleList,
    method: 'get',
    params: parameter
  })
}

export function delRecycle (parameter) {
  return request({
    url: apis.DelRecycle,
    method: 'get',
    params: parameter
  })
}

export function getTransfer () {
  return request({
    url: apis.Transfer,
    method: 'get'
  })
}

export function postTransfer (data) {
  return request({
    url: apis.Transfer,
    method: 'post',
    data: data
  })
}

export function importVipLogList (parameter) {
  return request({
    url: apis.ImportVipLogList,
    method: 'get',
    params: parameter
  })
}

export function getImportVip () {
  return request({
    url: apis.ImportVipAction,
    method: 'get'
  })
}

export function postImportVip (data) {
  return request({
    url: apis.ImportVipAction,
    method: 'post',
    data: data
  })
}

export function getOtherCustomer (parameter) {
  return request({
    url: apis.OtherCustomer,
    method: 'get',
    params: parameter
  })
}

export function getTotalState (parameter) {
  return request({
    url: apis.OtherState,
    method: 'get',
    params: parameter
  })
}

export function getLoopState (parameter) {
  return request({
    url: apis.OtherLoopState,
    method: 'get',
    params: parameter
  })
}

export function delAllOther (type) {
  return request({
    url: `${apis.DelOther}?type=${type}`,
    method: 'get'
  })
}

export function getEditAuto () {
  return request({
    url: apis.EditAuto,
    method: 'get'
  })
}

export function postEditAuto (data) {
  return request({
    url: apis.EditAuto,
    method: 'post',
    data: data
  })
}

export function getEditPatent () {
  return request({
    url: apis.EditZlAuto,
    method: 'get'
  })
}

export function postEditPatent (data) {
  return request({
    url: apis.EditZlAuto,
    method: 'post',
    data: data
  })
}

export function getEdit (id) {
  return request({
    url: `${apis.EditStatus}?id=${id}`,
    method: 'get'
  })
}

export function postEdit (id, data) {
  return request({
    url: `${apis.EditStatus}?id=${id}`,
    method: 'post',
    data: data
  })
}

export function getClick () {
  return request({
    url: apis.EditClick,
    method: 'get'
  })
}

export function postClick (data) {
  return request({
    url: apis.EditClick,
    method: 'post',
    data: data
  })
}

export function getAddNo () {
  return request({
    url: apis.AddNo,
    method: 'get'
  })
}

export function postAddNo (data) {
  return request({
    url: apis.AddNo,
    method: 'post',
    data: data
  })
}

export function getScreenList (parameter) {
  return request({
    url: apis.PoolList2,
    method: 'get',
    params: parameter
  })
}

export function getAddCustomer () {
  return request({
    url: apis.AddCustomer,
    method: 'get'
  })
}

export function postAddCustomer (data) {
  return request({
    url: apis.AddCustomer,
    method: 'post',
    data: data
  })
}

export function getEditSearch (id) {
  return request({
    url: `${apis.EditSearch}?customer_id=${id}`,
    method: 'get'
  })
}

export function postEditSearch (id, data) {
  return request({
    url: `${apis.EditSearch}?customer_id=${id}`,
    method: 'post',
    data: data
  })
}
